#include "g_rand.h"

static uint32_t TRand(void *buf, uint32_t bytes)
{
    uint32_t i;

    for (i = 0; i < bytes; i++)
    {
        ((uint8_t*)buf)[i] = G_GetTRNGData_8bit();
    }

    return i;
}

uint32_t G_RAND_RandP(void *rand, uint32_t bytes, void *p_rng)
{
    return TRand(rand, bytes);
}

uint32_t G_RAND_Init()
{
    G_TRNG_Init();

    return 0;
}
